3.1.94 \(\int \sqrt {a+a \sec (c+d x)} \, dx\) [94]

Optimal. Leaf size=37 \[ \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \]

[Out]

2*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))*a^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3859, 209} \begin {gather*} \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3859

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(a + x^2), x], x, b*(C
ot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \sqrt {a+a \sec (c+d x)} \, dx &=-\frac {(2 a) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 60, normalized size = 1.62 \begin {gather*} \frac {\sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)} \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(Sqrt[2]*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Sqrt[Cos[c + d*x]]*Sec[(c + d*x)/2]*Sqrt[a*(1 + Sec[c + d*x])])/d

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(88\) vs. \(2(31)=62\).
time = 0.13, size = 89, normalized size = 2.41

method result size
default \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}}{d}\) \(89\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/d*(a*(1+cos(d*x+c))/cos(d*x+c))^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+co
s(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (31) = 62\).
time = 0.57, size = 146, normalized size = 3.95 \begin {gather*} \frac {\sqrt {a} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \sin \left (d x + c\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \cos \left (d x + c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

sqrt(a)*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2
*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2
*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + cos(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 3.55, size = 133, normalized size = 3.59 \begin {gather*} \left [\frac {\sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right )}{d}, -\frac {2 \, \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[sqrt(-a)*log((2*a*cos(d*x + c)^2 - 2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x +
c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1))/d, -2*sqrt(a)*arctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(
d*x + c)/(sqrt(a)*sin(d*x + c)))/d]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \sec {\left (c + d x \right )} + a}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*sec(c + d*x) + a), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (31) = 62\).
time = 0.96, size = 130, normalized size = 3.51 \begin {gather*} -\frac {\sqrt {-a} a \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{d {\left | a \right |}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-sqrt(-a)*a*log(abs(2*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 - 4*sqrt(2)*abs(
a) - 6*a)/abs(2*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 + 4*sqrt(2)*abs(a) - 6
*a))*sgn(cos(d*x + c))/(d*abs(a))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))^(1/2),x)

[Out]

int((a + a/cos(c + d*x))^(1/2), x)

________________________________________________________________________________________